#ifndef _GAMERUNSCENE_H_
#define  _GAMERUNSCENE_H_

#include "Scene.h"
#include <iostream>
#include "QuadTree.h"
#include "MarioMap.h"
#include "Mario.h"
#include "InfoBar.h"
#include "CGame.h" ///// Chu y phan include phan
#include "PauseScene.h"
#include "GameOverScene.h"
#include "Collision.h"


class GamePlayScene: public Scene
{
private:
	bool collide;
	Mario * _mario;
	MarioMap *_map;
	QuadTree *_quadTree;
	list<Object*> _mapList;
	
	float remainingtime;
	Collision * _collision;

	D3DXVECTOR3 _cameraPos; 

	void _UpdateCamera();
	void _ProcessInput();
	void _OnKeyDown(int KeyCode);
	void _OnKeyUp(int KeyCode);
	
public:
	InfoBar *_infoBar;
 /*   void Create();*/
    void Leave();
    void Update(float DeltaTime);
    void Render();
    void Pause();
    void Resume();

	GamePlayScene(std::string MapPath, std::string QuadTreePath);
	~GamePlayScene();

};
#endif